Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

XHeaderCtrl.h

Go to the documentation of this file.
00001 // XHeaderCtrl.h
00002 //
00003 // This software is released into the public domain.
00004 // You are free to use it in any way you like.
00005 //
00006 // This software is provided "as is" with no expressed
00007 // or implied warranty.  I accept no liability for any
00008 // damage or loss of business that this software may cause.
00009 //
00010 ///////////////////////////////////////////////////////////////////////////////
00011 
00012 #ifndef XHEADERCTRL_H
00013 #define XHEADERCTRL_H
00014 
00015 #include <tchar.h>
00016 #include "MemDC.h"
00017 
00018 #define FLATHEADER_TEXT_MAX 80
00019 
00020 #define XHEADERCTRL_NO_IMAGE        0
00021 #define XHEADERCTRL_UNCHECKED_IMAGE 1
00022 #define XHEADERCTRL_CHECKED_IMAGE   2
00023 
00024 ///////////////////////////////////////////////////////////////////////////////
00025 // CXHeaderCtrl window
00026 
00027 #define FH_PROPERTY_SPACING         1
00028 #define FH_PROPERTY_ARROW           2
00029 #define FH_PROPERTY_STATICBORDER    3
00030 #define FH_PROPERTY_DONTDROPCURSOR  4
00031 #define FH_PROPERTY_DROPTARGET      5
00032 
00033 
00034 class CXHeaderCtrl : public CHeaderCtrl
00035 {
00036     DECLARE_DYNCREATE(CXHeaderCtrl)
00037 
00038 // Construction
00039 public:
00040     CXHeaderCtrl();
00041     virtual ~CXHeaderCtrl();
00042 
00043 // Attributes
00044 public:
00045     BOOL ModifyProperty(WPARAM wParam, LPARAM lParam);
00046     int GetSpacing() { return m_iSpacing; }
00047     void SetSpacing(int nSpacing) { m_iSpacing = nSpacing; }
00048 
00049 // Overrides
00050 public:
00051     virtual void DrawItem(LPDRAWITEMSTRUCT);
00052     virtual void DrawItem(CDC* pDC, CRect rect, LPHDITEM lphdi);
00053     // ClassWizard generated virtual function overrides
00054     //{{AFX_VIRTUAL(CXHeaderCtrl)
00055     //}}AFX_VIRTUAL
00056 
00057 // Implementation
00058 protected:
00059     BOOL m_bDoubleBuffer;
00060     int m_iSpacing;
00061     SIZE m_sizeImage;
00062     SIZE m_sizeArrow;
00063     BOOL m_bStaticBorder;
00064     UINT m_nDontDropCursor;
00065     BOOL m_bResizing;
00066     UINT m_nClickFlags;
00067     CPoint m_ptClickPoint;
00068 
00069     COLORREF m_cr3DHighLight;
00070     COLORREF m_cr3DShadow;
00071     COLORREF m_cr3DFace;
00072     COLORREF m_crBtnText;
00073 
00074     void DrawCtrl(CDC* pDC);
00075     int DrawImage(CDC* pDC, CRect rect, LPHDITEM hdi, BOOL bRight);
00076     int DrawBitmap(CDC* pDC, CRect rect, LPHDITEM hdi, CBitmap* pBitmap, 
00077         BITMAP* pBitmapInfo, BOOL bRight);
00078     int DrawText (CDC* pDC, CRect rect, LPHDITEM lphdi);
00079 
00080 // Generated message map functions
00081 protected:
00082     //{{AFX_MSG(CXHeaderCtrl)
00083     afx_msg LRESULT OnDeleteItem(WPARAM wparam, LPARAM lparam);
00084     afx_msg LRESULT OnInsertItem(WPARAM wparam, LPARAM lparam);
00085     afx_msg LRESULT OnLayout(WPARAM wparam, LPARAM lparam);
00086     afx_msg LRESULT OnSetImageList(WPARAM wparam, LPARAM lparam);
00087     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00088     afx_msg void OnPaint();
00089     afx_msg void OnSysColorChange();
00090     //}}AFX_MSG
00091     DECLARE_MESSAGE_MAP()
00092 };
00093 
00094 ///////////////////////////////////////////////////////////////////////////////
00095 
00096 //{{AFX_INSERT_LOCATION}}
00097 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00098 
00099 #endif //XHEADERCTRL_H

Generated on Mon Sep 12 19:58:58 2005 for Destiny3D by doxygen1.3-rc3